{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "38ecec96",
   "metadata": {},
   "source": [
    "## 上周回顾\n",
    "### 1.理解Ajex动态加载页面生成逻辑\n",
    "* 分析请求方法，模拟requests header\n",
    "* 分析API请求参数，模拟请求参数\n",
    "\n",
    "### 2.学会使用Google chrome浏览器进行xhr查询\n",
    "* 学习如何查找查询数据源\n",
    "* 学习阅读Json数据"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "65867805",
   "metadata": {},
   "source": [
    "## 本周内容\n",
    "### 第一个Ajex的数据请求\n",
    "> 1.数据源是从chrome浏览器xhr中查询到的  \n",
    "> 2.尝试使用浏览器中的requests header和payload  \n",
    "> 3.该数据源基本描述：页面cardlist数据的源数据  \n",
    "\n",
    "### 构建数据抓取构架\n",
    "### 尝试建立重复抓取数据的体系\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "74e049e5",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 通过xhr我们找liepin的数据分类体系如下：\n",
    "# condtion['data'].keys()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "ee32a1b9",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 尝试意义——对应 请求参数\n",
    "# playload['data'][]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "eff8f65b",
   "metadata": {},
   "source": [
    "# 请求数据准备"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "e3ce6cf1",
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'liepin_headers' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "Cell \u001b[1;32mIn[11], line 3\u001b[0m\n\u001b[0;32m      1\u001b[0m \u001b[38;5;66;03m# header\u001b[39;00m\n\u001b[0;32m      2\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mliepindata\u001b[39;00m\n\u001b[1;32m----> 3\u001b[0m \u001b[43mliepin_headers\u001b[49m()\n",
      "\u001b[1;31mNameError\u001b[0m: name 'liepin_headers' is not defined"
     ]
    }
   ],
   "source": [
    "# header\n",
    "import liepindata\n",
    "liepin_headers()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "cc76fdbe",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a6587cd5",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "6f4447cc",
   "metadata": {},
   "source": [
    "# 指定数据抓取"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "aaa7a024",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "60e5b390",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.7"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
